Use gtk_get_option_group() to obtain an option group with correctly set
authorMatthias Clasen <mclasen@redhat.com>
Tue, 28 Sep 2004 04:22:04 +0000 (04:22 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Tue, 28 Sep 2004 04:22:04 +0000 (04:22 +0000)
2004-09-28  Matthias Clasen  <mclasen@redhat.com>

* gtk/gtkmain.c (gtk_parse_args): Use gtk_get_option_group()
to obtain an option group with correctly set pre- and post-
parse hooks, instead of manually calling the hooks. This fixes
a problem with setting the program class in the gdk preparse
hook.  (#153788, Robert Ögren)

ChangeLog
ChangeLog.pre-2-10
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gtk/gtkmain.c

index 4d7be4b374006e372def87a6dab9f1bbd86c585c..35d950bd3d7bbe2ae0b1aa72353a965eaae2755b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2004-09-28  Matthias Clasen  <mclasen@redhat.com>
+
+       * gtk/gtkmain.c (gtk_parse_args): Use gtk_get_option_group() 
+       to obtain an option group with correctly set pre- and post-
+       parse hooks, instead of manually calling the hooks. This fixes
+       a problem with setting the program class in the gdk preparse
+       hook.  (#153788, Robert Ögren)
+
 2004-09-27  Matthias Clasen  <mclasen@redhat.com>
 
        Fix #153082:
index 4d7be4b374006e372def87a6dab9f1bbd86c585c..35d950bd3d7bbe2ae0b1aa72353a965eaae2755b 100644 (file)
@@ -1,3 +1,11 @@
+2004-09-28  Matthias Clasen  <mclasen@redhat.com>
+
+       * gtk/gtkmain.c (gtk_parse_args): Use gtk_get_option_group() 
+       to obtain an option group with correctly set pre- and post-
+       parse hooks, instead of manually calling the hooks. This fixes
+       a problem with setting the program class in the gdk preparse
+       hook.  (#153788, Robert Ögren)
+
 2004-09-27  Matthias Clasen  <mclasen@redhat.com>
 
        Fix #153082:
index 4d7be4b374006e372def87a6dab9f1bbd86c585c..35d950bd3d7bbe2ae0b1aa72353a965eaae2755b 100644 (file)
@@ -1,3 +1,11 @@
+2004-09-28  Matthias Clasen  <mclasen@redhat.com>
+
+       * gtk/gtkmain.c (gtk_parse_args): Use gtk_get_option_group() 
+       to obtain an option group with correctly set pre- and post-
+       parse hooks, instead of manually calling the hooks. This fixes
+       a problem with setting the program class in the gdk preparse
+       hook.  (#153788, Robert Ögren)
+
 2004-09-27  Matthias Clasen  <mclasen@redhat.com>
 
        Fix #153082:
index 4d7be4b374006e372def87a6dab9f1bbd86c585c..35d950bd3d7bbe2ae0b1aa72353a965eaae2755b 100644 (file)
@@ -1,3 +1,11 @@
+2004-09-28  Matthias Clasen  <mclasen@redhat.com>
+
+       * gtk/gtkmain.c (gtk_parse_args): Use gtk_get_option_group() 
+       to obtain an option group with correctly set pre- and post-
+       parse hooks, instead of manually calling the hooks. This fixes
+       a problem with setting the program class in the gdk preparse
+       hook.  (#153788, Robert Ögren)
+
 2004-09-27  Matthias Clasen  <mclasen@redhat.com>
 
        Fix #153082:
index 0d3d5e27b61d537ccba653951e1df6dbce457bdb..ec6c9f8cb292a7a7f87a83cbca01abb38e7410b8 100644 (file)
@@ -611,6 +611,7 @@ gtk_parse_args (int    *argc,
                char ***argv)
 {
   GOptionContext *option_context;
+  GOptionGroup *gtk_group;
   
   if (gtk_initialized)
     return TRUE;
@@ -618,20 +619,14 @@ gtk_parse_args (int    *argc,
   if (!check_setugid ())
     return FALSE;
 
-  do_pre_parse_initialization (argc, argv);
-
   option_context = g_option_context_new (NULL);
   g_option_context_set_ignore_unknown_options (option_context, TRUE);
   g_option_context_set_help_enabled (option_context, FALSE);
-  
-  g_option_context_add_main_entries (option_context, gtk_args, GETTEXT_PACKAGE);
-  gdk_add_option_entries_libgtk_only (g_option_context_get_main_group (option_context));
-
+  gtk_group = gtk_get_option_group (FALSE);
+  g_option_context_set_main_group (option_context, gtk_group);
   g_option_context_parse (option_context, argc, argv, NULL);
   g_option_context_free (option_context);
 
-  do_post_parse_initialization (argc, argv);
-  
   return TRUE;
 }